package com.kingboy.cloud.start.log;
/**
 * @author kingboy
 * @create 2020-07-28 10:37
 */

import org.slf4j.MyMDCAdapter;
import org.springframework.context.ApplicationContextInitializer;
import org.springframework.context.ConfigurableApplicationContext;

/**
 *@Description 初始化TtlMDCAdapter实例，并替换MDC中的adapter对象
 *@auther 郭金宝
 *@create 2020-07-28 10:37
 */
public class MyMDCAdapterInitializer implements ApplicationContextInitializer<ConfigurableApplicationContext> {
    @Override
    public void initialize(ConfigurableApplicationContext applicationContext) {
        //加载TtlMDCAdapter实例
        MyMDCAdapter.getInstance();
    }
}
